//
//  MrLvSegmentView.h
//  AF3
//
//  Created by dzMac on 16/5/8.
//  Copyright © 2016年 lvlinhu. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol MrLvSegmentViewDelegate <NSObject>
@optional
/**
 选择index回调
 
 */
-(void)selectedIndex:(NSInteger)index;
@end


@interface MrLvSegmentView : UIView

/**
 选择回调
 */
@property (nonatomic, assign)id<MrLvSegmentViewDelegate> delegate;

/**
 字体非选中时颜色
 */
@property (nonatomic, strong) UIColor *textNomalColor;
/**
 字体选中时颜色
 */
@property (nonatomic, strong) UIColor *textSelectedColor;
/**
 横线颜色
 */
@property (nonatomic, strong) UIColor *lineColor;
/**
 字体大小
 */
@property (nonatomic, assign) UIFont *titleFont;

@property (nonatomic, strong) NSMutableArray *arrTitle;// 按钮标题
@property (nonatomic, strong) NSMutableArray *arrNomalIcon;// 按钮图标 常规状态
@property (nonatomic, strong) NSMutableArray *arrIcon;// 按钮图标 选中状态
@property (nonatomic, strong) UIImageView   *lineView;//按钮下边横条

/**
 *  用于创建选择按钮
 *
 *  @param frame    segmentView的大小
 *  @param titlesArr 数据源
 *
 *  @return segment
 */

- (instancetype)initWithFrame:(CGRect)frame withTitlesArr:(NSMutableArray *)titlesArr iconArr:(NSMutableArray *)iconArr;

/**
 手动选择
 
 @param index inde（从0开始）
 */
-(void)selectIndex:(NSInteger)index;


@end
